/*
 * tarm_FactorConfig.c
 *
 *  Created on: 2020年2月10日
 *      Author: AN
 */


#include "tarm_FactorConfig.h"

/************ NEW Factor value **************/
const struct _TARM_FactorStruct g_TARM_Factor={
		//1- limit prime(限位角度-主轴);	limit vice(限位角度-副轴)
		.limit_p=135,	.limit_v=23,
		//2- null vice(零点角度-主轴);		null vice(零点角度-副轴)
		.null_p=90,	.null_v=45,
		//3- 臂长
		.length_p=20,	.length_v=20,
		//4- 步进电机步长
		.step_p=0.032f,	.step_v=0.032f,
		.step_r=0.032f
};

/************ new running record value **************/
struct _TARM_RunningRecordStruct g_TARM_RunRecord = {

	//1- PV轴运动参数
	.pv_current = {
		.x = 0, .y = 0, .p = 135, .v = 23},
	.pv_distance = {0, 0, 135, 23},
	.pv_start = {0, 0, 135, 23},
	//2- R轴运动参数
	.r_val = {0, 0},

	.StartRun_pv = 0,
	.StartRun_r = 0,
	.ReadyRunLoc_x = 0,
	.ReadyRunLoc_y = 0,
	.ReadyRunLoc_speed = 0,
	.ReadyRunLoc_r = 0,
	.ReadyRunLoc_speedr = 0,

	//3- 时钟1方案下，各轴运动进行中标志位
	.RunFlag_p = 0,
	.RunFlag_v = 0,
	.RunFlag_r = 0,
	//4- 时钟1方案下，各轴运动时间记录
	.CounterTimer_p = 0,
	.CounterTimer_v = 0,
	.CounterTimer_r = 0,

	//5- 时钟2方案下，速度控制参数
	.SpeedReci_MsPerCm = 1000,

	//6- 末端舵机参数
	.TurnNum = 0,
	.ClickNum = 0
};

/************ report value **************/
//上报状态、闭环错误标志
struct _ReportStruct ReportStruct={
		.Uart1ReportFlag={0,0,0},
		.Uart1ReportFlag={0,0,0},
		.SpeedDebugStruct={
				.ReportFlag = 2,
				.MinTimeForTheory = 0,
				.MinTimeForReally = 0,
				.Buffer = ""}
};
